<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>校车查询-大连交通大学在线服务平台</title>
<link href="css/bootstrap.min.css" rel="stylesheet" />
<link href="css/common.css" rel="stylesheet" />
<link href="images/favicon.ico" rel="shortcut icon" />
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.js"></script>
<script src="js/bootstrapValidator.min.js"></script>
<script src="js/language/zh_CN.js"></script>
<script src="js/common.js"></script>
</head>
<body>
	<%@include file="subpage/head.jsp"%>
	<div class="container">
		<div class="logo-div">
			<div class="img-logo">
				<img id="img-logo" src="images/logo.png" alt="大连交通大学" />
			</div>
			<div class="search-div">
				<form action="#" method="post" class="navbar-form">
					<div class="input-group">
						<span class="input-group-btn"> <label for="sel-search" class="sr-only"></label> <select
							class="form-control" name="type" id="sel-search">
								<option value="goods">二手物品</option>
								<option value="news">新闻资讯</option>
								<option value="lost">失物招领</option>
						</select></span> <input class="form-control" type="text" name="wd" placeholder="请输入要查找的内容" /> <span
							class="input-group-btn">
							<button id="btn-search" type="submit" class="btn btn-default">搜索</button>
						</span>
					</div>
				</form>
			</div>
			<div class="img-er">
				<img id="img-er" src="images/er.png" width="90px" height="90px" alt="二维码" />
			</div>
		</div>
		<nav class="navbar navbar-default">
			<ul class="nav nav-pills nav-justified">
				<li><a href="index.jsp">首页</a></li>
				<li><a href="secondhand.jsp">二手物品</a></li>
				<li><a href="lost.jsp">失物招领</a></li>
				<li><a href="news.jsp">新闻资讯</a></li>
				<li class="active"><a href="car.jsp">校车查询</a></li>
				<c:if test="${not empty user}">
					<li><a href="user.jsp">用户中心</a></li>
				</c:if>
			</ul>
		</nav>
	</div>
	<br />
	<div class="container">
		<div class="list-group">
			<p class="list-group-item active">
				<img src="images/bus.png" width="20px" height="20px" alt="" /> 校车时间查询：
			</p>
			<div class="row">
				<form action="index/car_show.do" class="form-group-sm" role="form" method="post">
					<br>
					<div style="margin-left: 5%">
						<table>
							<tr>
								<td style="width: 20px"></td>
								<td><label>乘坐地点:&nbsp;&nbsp;</label></td>
								<td><select name="locationstart" class="form-control">
										<option value="">全部</option>
										<option value="校本部">校本部</option>
										<option value="旅顺">旅顺校区</option>
										<option value="大连火车站">大连火车站</option>
								</select></td>
								<td style="width: 30px"></td>
								<td><label>开始时间:&nbsp;&nbsp;</label></td>
								<td><div class="input-group date form_time" data-date-format="hh:ii">
										<input type="text" name="starttimeStart" class="form-control" /><span class="input-group-addon"><span
											class="glyphicon glyphicon-time"></span></span>
									</div></td>
								<td style="width: 30px"></td>
								<td><label>结束时间:&nbsp;&nbsp;</label></td>
								<td><div class="input-group date form_time" data-date-format="hh:ii">
										<input type="text" name="starttimeEnd" class="form-control" /><span class="input-group-addon"><span
											class="glyphicon glyphicon-time"></span></span>
									</div></td>
								<td style="width: 30px"></td>
								<td><button type="submit" class="btn btn-sm btn-success">
										<span class="glyphicon glyphicon-search"></span>&nbsp;查询
									</button></td>
								<td></td>
							</tr>
						</table>
					</div>
				</form>
			</div>
		</div>
		<div class="list-group">
			<p class="list-group-item active">
				<img src="images/bus.png" width="20px" height="20px" alt="" /> 结果列表
			</p>
			<br>
			<p class="text-danger" style="font-size: 25px">&nbsp;★重要提示！</p>
			<p class="text-info">1.数据库更新于2015年5月。</p>
			<p class="text-info">2.周六周日为流水班车。</p>
			<p class="text-info">3.节假日班车不提供查询，乘坐前务拨打校车调度联系电话或宿舍楼下通知。</p>
			<p class="text-info">4.联系电话：孙先生：18741167203 杨女士：15942455471</p>
			<table class="table table-bordered table-hover table-striped car-table">
				<tr>
					<td><label>出发站：</label></td>
					<td><label>到达站：</label></td>
					<td><label>开车时间：</label></td>
					<td><label>到达时间：</label></td>
				</tr>
				<c:choose>
					<c:when test="${not empty s_car}">
						<c:forEach items="${s_car}" var="car" begin="0" end="9">
							<tr>
								<td>${car.locationstart}</td>
								<td>${car.locationend}</td>
								<td><fmt:formatDate value="${car.starttime}" pattern="a HH:mm" /></td>
								<td><fmt:formatDate value="${car.endtime}" pattern="a HH:mm" /></td>
							</tr>
						</c:forEach>
					</c:when>
					<c:otherwise>
						<c:forEach items="${application.index_car}" var="car" begin="0" end="9">
							<tr>
								<td>${car.locationstart}</td>
								<td>${car.locationend}</td>
								<td><fmt:formatDate value="${car.starttime}" pattern="a HH:mm" /></td>
								<td><fmt:formatDate value="${car.endtime}" pattern="a HH:mm" /></td>
							</tr>
						</c:forEach>
					</c:otherwise>
				</c:choose>
			</table>
		</div>
	</div>
	<div class="container">
		<div class="foot-div">
			<!-- 底部栏 -->
			<%@include file="subpage/footer.jsp"%>
		</div>
	</div>
	<script type="text/javascript">
		$('.form_time').datetimepicker({
			weekStart : 1,
			todayBtn : 1,
			autoclose : 1,
			todayHighlight : 1,
			startView : 1,
			minView : 0,
			maxView : 1,
			forceParse : 0
		});
	</script>
	<!--end body div-->
</body>
</html>